<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加商品</title>
</head>
<body>
<h1>添加商品</h1>
<form action="addProduct" method="post">
    <label for="name">商品名称：</label>
    <input type="text" id="name" name="name" required><br><br>
    <label for="price">商品价格：</label>
    <input type="number" id="price" name="price" step="0.01" required><br><br>
    <label for="category">商品类别：</label>
    <input type="text" id="category" name="category" required><br><br>
    <input type="submit" value="添加">
</form>
<% if (request.getAttribute("err") != null) { %>
<p style="color: red;"><%= request.getAttribute("err") %></p>
<% } %>
</body>
</html>